//
//  BSFile.m
//  Spriter_forCocs2d
//
//  Created by Yang Bean on 13/4/19.
//
//

#import "BSFile.h"

@implementation BSFile
- (id)initWithFileID:(int)fid
                name:(NSString*)name
               width:(int)w
              height:(int)h
{
    self = [super init];
    if (self) {
        m_id = fid;
        m_width = w;
        m_height = h;
        m_name = [name retain];
    }
    return self;
}
- (int)fileID
{
    return m_id;
}
- (NSString*)name
{
    return m_name;
}
- (int)width
{
    return m_width;
}
- (int)height
{
    return m_height;
}
- (NSString *)description
{
    return [NSString stringWithFormat:@"id = %d, name = %@, w = %d, h = %d \n", m_id, m_name, m_width, m_height];
}
- (void)dealloc
{
    NSLog(@"dealloc   file");
    [m_name retain];
    [super dealloc];
}
@end